home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / c++ / cplxops.z / cplxops
Encoding:
Text File  |  2002-10-03  |  4.6 KB  |  103 lines

  1. CPLXOPS(3C)                                           Last changed: 3-22-99
  2.  
  3.  
  4. NNAAMMEE
  5.      ccoommpplleexx__ooppeerraattoorrss - Operators for the C++ complex math library
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ccoommpplleexx..hh>>
  9.  
  10.      ccllaassss ccoommpplleexx {{
  11.  
  12.      ppuubblliicc::
  13.           ffrriieenndd ccoommpplleexx ooppeerraattoorr++((ccoommpplleexx,, ccoommpplleexx));;
  14.           ffrriieenndd ccoommpplleexx ooppeerraattoorr--((ccoommpplleexx));;
  15.           ffrriieenndd ccoommpplleexx ooppeerraattoorr--((ccoommpplleexx,, ccoommpplleexx));;
  16.           ffrriieenndd ccoommpplleexx ooppeerraattoorr**((ccoommpplleexx,, ccoommpplleexx));;
  17.           ffrriieenndd ccoommpplleexx ooppeerraattoorr//((ccoommpplleexx,, ccoommpplleexx));;
  18.  
  19.           ffrriieenndd iinntt     ooppeerraattoorr====((ccoommpplleexx,, ccoommpplleexx));;
  20.           ffrriieenndd iinntt     ooppeerraattoorr!!==((ccoommpplleexx,, ccoommpplleexx));;
  21.  
  22.           vvooiidd ooppeerraattoorr++==((ccoommpplleexx));;
  23.           vvooiidd ooppeerraattoorr--==((ccoommpplleexx));;
  24.           vvooiidd ooppeerraattoorr**==((ccoommpplleexx));;
  25.           vvooiidd ooppeerraattoorr//==((ccoommpplleexx));;
  26.  
  27.      }};;
  28.  
  29. IIMMPPLLEEMMEENNTTAATTIIOONN
  30.      IRIX systems (--oo3322 ABI only)
  31.  
  32. DDEESSCCRRIIPPTTIIOONN
  33.           NOTE: This man page applies only to the --oo3322 ABI.  The MIPSpro
  34.           --nn3322 and --6644 ABIs support the template-based complex class which
  35.           is included in the C++ standard library and is automatically
  36.           loaded by the MIPSpro C++ compiler.  The --llmm option must still be
  37.           used to link the math library.
  38.  
  39.      The basic arithmetic operators, comparison operators, and assignment
  40.      operators are overloaded for complex numbers.  The operators have
  41.      their conventional precedences.  In the following descriptions for
  42.      ccoommpplleexx operators,
  43.       - _x, _y, and _z are of type ccoommpplleexx.
  44.  
  45.      Arithmetic operators:
  46.  
  47.      _z == _x ++ _y      Returns a ccoommpplleexx which is the arithmetic sum of
  48.                     complex numbers _x and _y.
  49.  
  50.      _z == --_x         Returns a ccoommpplleexx which is the arithmetic negation of
  51.                     complex number _x.
  52.  
  53.      _z == _x -- _y      Returns a ccoommpplleexx which is the arithmetic difference of
  54.                     complex numbers _x and _y.
  55.  
  56.      _z == _x ** _y      Returns a ccoommpplleexx which is the arithmetic product of
  57.                     complex numbers _x and _y.
  58.  
  59.      _z == _x // _y      Returns a ccoommpplleexx which is the arithmetic quotient of
  60.                     complex numbers _x and _y.
  61.  
  62.      Comparison operators:
  63.  
  64.      _x ==== _y         Returns non-zero if complex number _x is equal to
  65.                     complex number _y; returns 0 otherwise.
  66.  
  67.      _x !!== _y         Returns non-zero if complex number _x is not equal to
  68.                     complex number _y; returns 0 otherwise.
  69.  
  70.      Assignment operators:
  71.  
  72.      _x ++== _y         Complex number _x is assigned the value of the
  73.                     arithmetic sum of itself and complex number _y.
  74.  
  75.      _x --== _y         Complex number _x is assigned the value of the
  76.                     arithmetic difference of itself and complex number _y.
  77.  
  78.      _x **== _y         Complex number _x is assigned the value of the
  79.                     arithmetic product of itself and complex number _y.
  80.  
  81.      _x //== _y         Complex number _x is assigned the value of the
  82.                     arithmetic quotient of itself and complex number _y.
  83.  
  84. WWAARRNNIINNGGSS
  85.      The assignment operators do not produce a value that can be used in an
  86.      expression.  That is, the following construction is syntactically
  87.      invalid:
  88.  
  89.           complex    x, y, z;
  90.           .
  91.           x = ( y += z );
  92.  
  93.      Whereas, the following is valid:
  94.  
  95.           x = ( y + z );
  96.  
  97.           x = ( y == z );
  98.  
  99. SSEEEE AALLSSOO
  100.      ccoommpplleexx(3C), ccaarrttppooll(3C), ccppllxxeerrrr(3C), ccppllxxeexxpp(3C), ccppllxxttrriigg(3C)
  101.  
  102.      This man page is available only online.
  103.